#ifndef FASYS_LIBS_SUBSCRIBER_SUBSCRIBER_INFO_HPP
#define FASYS_LIBS_SUBSCRIBER_SUBSCRIBER_INFO_HPP

#include "types.hpp"

namespace fasys{ namespace subscriber{

class subscription;

struct subscriber_info
{
  subscribe_id_t subscribe_id;
  channel_id_t channel_id;
  time_t lifetime;
  time_t timeout;

  // устанавивается автоматически
  time_t death_time;
  // устанавивается автоматически
  time_t timeout_time;
  subscription* ptr;
public:
  subscriber_info()
    : subscribe_id(0)
    , channel_id(0)
    , lifetime(0)
    , timeout(0)
    , death_time(0)
    , ptr(0)
  {}

  subscription* operator -> () { return ptr; }
  operator bool () const { return ptr!=0;}
};

}}

#endif;